home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 2 / Atari Mega Archive CD - Volume 2.iso / minix / up1510b.tgz / up1510b / src / fs / const.h < prev    next >
Text File  |  1990-07-23  |  3KB  |  58 lines

  1. /* Tables sizes */
  2. #define NR_ZONE_NUMS       9    /* # zone numbers in an inode */
  3.  
  4. #define NR_FILPS          64    /* # slots in filp table */
  5. #define I_MAP_SLOTS        8    /* max # of blocks in the inode bit map */
  6. #define ZMAP_SLOTS         8    /* max # of blocks in the zone bit map */
  7. #define NR_INODES         32    /* # slots in "in core" inode table */
  8. #define NR_SUPERS          5    /* # slots in super block table */
  9.  
  10. #define FS_STACK_BYTES  (272 * sizeof (char *)) /* size of file system stack */
  11.  
  12. /* Miscellaneous constants */
  13. #define SUPER_MAGIC   0x137F    /* magic number contained in super-block */
  14. #define SU_UID        (uid_t) 0    /* super_user's uid_t */
  15. #define SYS_UID    (uid_t) 0    /* uid_t for processes MM and INIT */
  16. #define SYS_GID    (gid_t) 0    /* gid_t for processes MM and INIT */
  17. #define NORMAL               0    /* forces get_block to do disk read */
  18. #define NO_READ            1    /* prevents get_block from doing disk read */
  19. #define PREFETCH           2    /* tells get_block not to read or mark dev */
  20.  
  21. #define XPIPE  -(NR_TASKS+1)    /* used in fp_task when suspended on pipe */
  22. #define XOPEN  -(NR_TASKS+2)    /* used in fp_task when suspended in open */
  23.  
  24. #define NO_BIT    (bit_nr) 0    /* returned by alloc_bit() to signal failure */
  25. #define DUP_MASK        0100    /* mask to distinguish dup2 from dup */
  26.  
  27. #define LOOK_UP            0    /* tells search_dir to lookup string */
  28. #define ENTER              1    /* tells search_dir to make dir entry */
  29. #define DELETE             2    /* tells search_dir to delete entry */
  30.  
  31. #define CLEAN              0    /* disk and memory copies identical */
  32. #define DIRTY              1    /* disk and memory copies differ */
  33. #define ATIME            002    /* set if atime field needs updating */
  34. #define CTIME            004    /* set if ctime field needs updating */
  35. #define MTIME            010    /* set if mtime field needs updating */
  36.  
  37. #define BOOT_BLOCK  (block_nr)0    /* block number of boot block */
  38. #define SUPER_BLOCK (block_nr)1    /* block number of super block */
  39. #define ROOT_INODE  (ino_t)1    /* inode number for root directory */
  40.  
  41. #define INFO               2    /* where in data_org is info from build */
  42. #define END_OF_FILE     -104    /* eof detected */
  43.  
  44. /* Derived sizes */
  45. #define ZONE_NUM_SIZE    sizeof(zone_nr)         /* # bytes in zone nr  */
  46. #define NR_DZONE_NUM     (NR_ZONE_NUMS-2)         /* # zones in inode    */
  47. #define DIR_ENTRY_SIZE   sizeof(dir_struct)         /* # bytes/dir entry   */
  48. #define INODES_PER_BLOCK (BLOCK_SIZE/INODE_SIZE)     /* # inodes/disk blk   */
  49. #define INODE_SIZE       (sizeof (d_inode))         /* bytes in disk inode */
  50. #define NR_DIR_ENTRIES   (BLOCK_SIZE/DIR_ENTRY_SIZE) /* # dir entries/block */
  51. #define NR_INDIRECTS     (BLOCK_SIZE/ZONE_NUM_SIZE)  /* # zones/indir block */
  52. #define INTS_PER_BLOCK   (BLOCK_SIZE/sizeof(int))    /* # integers/block    */
  53. #define SUPER_SIZE       sizeof(struct super_block)  /* super_block size    */
  54. #define PIPE_SIZE        (NR_DZONE_NUM*BLOCK_SIZE)   /* pipe size in bytes  */
  55. #define MAX_ZONES (NR_DZONE_NUM+NR_INDIRECTS+(long)NR_INDIRECTS*NR_INDIRECTS)
  56.                              /* max zones in a file */
  57. #define printf printk
  58.